﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;

public partial class test : System.Web.UI.Page
{
    seleData ddsj = new seleData();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
         
    }
    private void WriteLog(string strMemo)
    {

        string filename = Server.MapPath("~/") + "logs\\log.txt";

        if (!Directory.Exists(Server.MapPath("~/") + ("logs\\")))
            Directory.CreateDirectory("\\logs\\");

        StreamWriter sr = null;

        try
        {

            if (!File.Exists(filename))
            {

                sr = File.CreateText(filename);

            }

            else
            {

                sr = File.AppendText(filename);

            }

            sr.WriteLine(strMemo);

        }

        catch
        {

        }

        finally
        {

            if (sr != null)

                sr.Close();

        }

    }
}